﻿<local:DocumentBase x:Class="WPFExcelReport.DSTVKPOS"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:db="clr-namespace:DSTVKPOS"
                    xmlns:dat="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
                    xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core" 
                    xmlns:wep="clr-namespace:WPFExcelReport" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    xmlns:tra="clr-namespace:WPFExcelReport.TranslationByMarkupExtension;assembly=ReflectionStudio.Core"
                    FontSize="14" 
                    Background="White" 
                    Title="生产指令表" 
                    HorizontalAlignment="Stretch"
                    Margin="0,0,0,0" 
                    VerticalAlignment="Stretch"
                    >
    <local:DocumentBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:MaskPrice  x:Key="dprice"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:String2ColorConverter  x:Key="str2color"/>
        <db:SETDSTVKPOS  x:Key="SETVK" />
        <CollectionViewSource   x:Key="vwWDECK" Source="{Binding Path=WDECK,Source={StaticResource SETVK}}" />
        <CollectionViewSource   x:Key="vwVKPOS" Source="{Binding Path=VKPOS,Source={StaticResource SETVK}}" />
        <CollectionViewSource   x:Key="vwVKKOPF" Source="{Binding Path=VKKOPF,Source={StaticResource SETVK}}" />
        <CollectionViewSource   x:Key="vwWASTAMM" Source="{Binding Path=WASTAMM,Source={StaticResource SETVK}}" />
        <CollectionViewSource  x:Key="vwWAFARBEN" Source="{Binding Path=WAFARBEN,Source={StaticResource SETVK}}" />
        <CollectionViewSource   x:Key="vwWAPROF" Source="{Binding Path=WAPROF,Source={StaticResource SETVK}}" />
        <CollectionViewSource   x:Key="vwVKKANGE" Source="{Binding Path=VKKANGE,Source={StaticResource SETVK}}" />
        <CollectionViewSource   x:Key="vwVKKBEST" Source="{Binding Path=VKKBEST,Source={StaticResource SETVK}}" />
        <CollectionViewSource   x:Key="vwVKKIVDI" Source="{Binding Path=VKKIVDI,Source={StaticResource SETVK}}" />
        <CollectionViewSource   x:Key="vwVKKIVVT" Source="{Binding Path=VKKIVVT,Source={StaticResource SETVK}}" />
        <CollectionViewSource   x:Key="vwVKKLIEF" Source="{Binding Path=VKKLIEF,Source={StaticResource SETVK}}" />
        <CollectionViewSource   x:Key="vwVKKLVOR" Source="{Binding Path=VKKLVOR,Source={StaticResource SETVK}}" />
        <CollectionViewSource   x:Key="vwVKKRECH" Source="{Binding Path=VKKRECH,Source={StaticResource SETVK}}" />
        <CollectionViewSource   x:Key="vwVKPANGE" Source="{Binding Path=VKPANGE,Source={StaticResource SETVK}}" />
        <CollectionViewSource   x:Key="vwVKPBEST" Source="{Binding Path=VKPBEST,Source={StaticResource SETVK}}" />
        <CollectionViewSource   x:Key="vwVKPIVDI" Source="{Binding Path=VKPIVDI,Source={StaticResource SETVK}}" />
        <CollectionViewSource   x:Key="vwVKPIVVT" Source="{Binding Path=VKPIVVT,Source={StaticResource SETVK}}" />
        <CollectionViewSource   x:Key="vwVKPLIEF" Source="{Binding Path=VKPLIEF,Source={StaticResource SETVK}}" />
        <CollectionViewSource   x:Key="vwVKPLVOR" Source="{Binding Path=VKPLVOR,Source={StaticResource SETVK}}" />
        <CollectionViewSource   x:Key="vwVKPRECH" Source="{Binding Path=VKPRECH,Source={StaticResource SETVK}}" />
    </local:DocumentBase.Resources> 
    <StackPanel>
        <Expander  Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3"
            Name="expLog" ExpandDirection="Down" IsExpanded="True">
            <StackPanel>
            <WrapPanel Name="zoneCommand" Margin="4,0,51,6" Grid.ColumnSpan="3">
                <Label Content="系统" Width="40" Margin="0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                <TextBox Name="txtMANDANT" MaxLength="2" Width="40" Margin="10,0,0,0" Text="00" HorizontalAlignment="Left" Background="Pink" FontSize="18" TabIndex="1" />
                <Label Content="语言" Width="40" Margin="0,0,0,0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                <TextBox IsReadOnly="True" Name="txtSPRACHKZ" Width="40" Margin="0,0,0,0" Text="" MaxLength="1" HorizontalAlignment="Left" Background="Pink" FontSize="18" TabIndex="2" />
                <Label Content="用户名" Width="60" Margin="10,0,0,0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                <TextBox Name="txtUserID" Width="80" Margin="10,0,0,0" Text="" HorizontalAlignment="Left" Background="Yellow" FontSize="18" MaxLength="8" AcceptsTab="False" CharacterCasing="Upper" KeyboardNavigation.TabIndex="0" TabIndex="3" />
                <Label Content="密码" Width="40" Margin="10,0,0,0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                <PasswordBox Name="txtPassword" Width="80" Margin="10,0,0,0" HorizontalAlignment="Left" Background="Yellow" FontSize="18" KeyboardNavigation.TabIndex="1" TabIndex="4" />
                <Button Height="Auto" Margin="10,0,0,0" Name="btnLogIn" Width="Auto" Click="btnLogIn_Click" KeyboardNavigation.TabIndex="2" IsDefault="True" TabIndex="5">
                     登录
                </Button>
                <CheckBox FontSize="14" Content="属于评审组" Name="IsBelongs2V9"
                              Visibility="Hidden"></CheckBox>
                <TextBlock FontSize="14" MinWidth="200" Width="Auto" Name="MemberV9" Background="#FF00AF00"
                               Visibility="Hidden"></TextBlock>
                <TextBlock Name="txtLogIn" Width="Auto" Margin="10,0,0,0" HorizontalAlignment="Left" Background="White" FontSize="14" KeyboardNavigation.TabIndex="1" />
            </WrapPanel>
            </StackPanel>
        </Expander>
        <WrapPanel Name="ZoneFTP"
                   Visibility="Hidden">
            <CheckBox FontSize="14"
                      Content="属于管理员"
                      Name="IsBelongs2Admin"></CheckBox>
            <TextBlock FontSize="14"
                       MinWidth="200"
                       Width="Auto"
                       Name="Administration"
                       Background="#FF00AF00"></TextBlock>
            <TextBlock>FTP站点:</TextBlock>
            <TextBox Name="txtFTPSite"
                     Width="Auto"
                     TabIndex="6">192.168.1.102</TextBox>
            <TextBox Name="txtFTPPort"
                     Width="Auto"
                     TabIndex="7">21</TextBox>
            <Label Content="用户名"
                   Width="60"
                   Margin="10,0,0,0"
                   HorizontalAlignment="Left"
                   FontSize="18"
                   VerticalAlignment="Center" />
            <TextBox Name="txtFTPUser"
                     Width="80"
                     Margin="10,0,0,0"
                     Text="sun"
                     HorizontalAlignment="Left"
                     Background="Yellow"
                     FontSize="18"
                     MaxLength="8"
                     AcceptsTab="False"
                     CharacterCasing="Upper"
                     KeyboardNavigation.TabIndex="0"
                     TabIndex="8" />
            <Label Content="密码"
                   Width="40"
                   Margin="10,0,0,0"
                   HorizontalAlignment="Left"
                   FontSize="18"
                   VerticalAlignment="Center" />
            <PasswordBox Name="txtFTPPwd"
                         Width="80"
                         Margin="10,0,0,0"
                         HorizontalAlignment="Left"
                         Background="Yellow"
                         FontSize="18"
                         KeyboardNavigation.TabIndex="1"
                         TabIndex="9" />
            <Button Height="Auto"
                    Margin="10,0,0,0"
                    Name="btnLogFTP"
                    Width="34"
                    Click="btnLogFTP_Click"
                    KeyboardNavigation.TabIndex="2"
                    IsDefault="True"
                    TabIndex="10">
                <Button.Background>
                    <ImageBrush ImageSource="/IntexReportClient;component/Images/User.png" />
                </Button.Background>
            </Button>
        </WrapPanel>
        <WrapPanel>
            <WrapPanel Name="ZoneOrder">
            <TextBlock Width="Auto">订单号:</TextBlock>
            <TextBox   Name="txtVKPAUFKRS" MaxLength="2" Width="40" Margin="10,0,0,0"  HorizontalAlignment="Left" Background="Pink"  CharacterCasing="Upper" TabIndex="11" />
            <TextBox   Name="txtVKPAUFLFD" MaxLength="6" Width="80" Margin="0,0,0,0"  HorizontalAlignment="Left" TabIndex="12" />
            <Button  Height="30"  Width="30" Margin="10,0,0,0" Name="btnGetVKPOS" Click="btnGetVKPOS_Click" KeyboardNavigation.TabIndex="3" IsDefault="True" TabIndex="13">
                <Button.Background>
                    <ImageBrush ImageSource="/IntexReportClient;component/Images/Search.png" />
                </Button.Background>
            </Button>
            </WrapPanel>
            <WrapPanel Name="ZoneAccount">
            <Button Content="EXCEL" Margin="20,0,0,0" Name="btnReport" Width="47" Click="btnReport_Click" TabIndex="14" />
            <Button   Content="预览" Margin="20,0,0,0" Name="btnPrintPreview" Width="51" Click="btnPrintPreview_Click" TabIndex="15" />
            <CheckBox Content="送审" FontSize="18" Name="IsSendForAuditing" IsChecked="True" />
            </WrapPanel>
            <WrapPanel Name="ZoneAuditing">
            <CheckBox Content="审单"
                      FontSize="18"
                      Name="IsOnAuditing" />
                <Button   Content="预览"
                          Margin="20,0,0,0"
                          Name="btnAuditing"
                          Width="51"
                          Click="btnPrintPreview_Click"
                          TabIndex="15" />
                <Button Content="发布" Name="btnDistribute" Width="51" Margin="20,0,0,0" Click="btnDistribute_Click" TabIndex="16" />
            <TextBox FontSize="18" IsReadOnly="True" MaxLength="1" Name="txtShareroot" Text="R:\" Width="40" IsEnabled="False"
                     Visibility="Hidden">
                <TextBox.Background>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="Black" Offset="0" />
                        <GradientStop Color="#FFA69595" Offset="1" />
                    </LinearGradientBrush>
                </TextBox.Background>
            </TextBox>
            </WrapPanel>
        </WrapPanel>
        <Expander  Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3"
            Name="expVK" ExpandDirection="Down" IsExpanded="True"> 
          <WrapPanel>
                <Grid> 
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="Auto"></RowDefinition>
                        <RowDefinition Height="Auto"></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition  Width="1*" />
                        <ColumnDefinition  Width="1*" />
                        <ColumnDefinition Width="1*" />
                        <ColumnDefinition Width="1*" />
                    </Grid.ColumnDefinitions>
                        <StackPanel  Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4"> 
                            <WrapPanel>
                            <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <Label Content="客户号:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                <TextBlock Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" 
                                                                 Text="{Binding Path=VKKKUNDNR, Source={StaticResource ResourceKey=vwVKKOPF}}" VerticalAlignment="Center" Width="120" />
                            </Grid>
                            <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <Label Content="发货条件:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                            <TextBlock Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Text="{Binding Path=VKKLIEFBED, Source={StaticResource ResourceKey=vwVKKOPF}}" VerticalAlignment="Center" Width="60" />
                            </Grid>
                            <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <Label Content="运输方式:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Text="{Binding Path=VKKVERSART, Source={StaticResource ResourceKey=vwVKKOPF}}" VerticalAlignment="Center" Width="60" />
                            </Grid>
                            <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <Label Content="销售合同:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                                <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Text="{Binding Path=VKKBESTNR, Source={StaticResource ResourceKey=vwVKKOPF}}" VerticalAlignment="Center" Width="120" />
                            </Grid> 
                    </WrapPanel>
                        </StackPanel>
                        <DataGrid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3"
                              AutoGenerateColumns="False"
                              EnableRowVirtualization="True"  
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwVKPOS}}"  
                              HeadersVisibility="Column"
                              x:Name="dgVKPOS"    
                              Width="Auto"
                              Height="Auto"
                              MaxHeight="150"
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto" 
                              SelectionChanged="dgVKPOS_SelectionChanged">
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=VKPPOSTYP}" Header="类型"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPZUSATZ}" Header="标准"  Width="Auto" MinWidth="20"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPART}" Header="品种"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPFARBE, Converter={StaticResource ResourceKey=gb2312}}" Header="颜色"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPKDARTNR, Converter={StaticResource ResourceKey=gb2312}}" Header="客人花号"   Width="Auto"  MinWidth="100"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPKDFARBNR, Converter={StaticResource ResourceKey=gb2312}}" Header="" Width="Auto" MinWidth="100"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPMEEH}" Header="单位"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPMENGE1, Converter={StaticResource ResourceKey=d100}}" Header="数量" Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPMGV, Converter={StaticResource ResourceKey=d100}}" Header="最少"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPMGB, Converter={StaticResource ResourceKey=d100}}" Header="最多"  Width="Auto" MinWidth="40"/>                            
                            <DataGridTextColumn Binding="{Binding Path=VKPLIEFTERM}" Header="交期"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPWVTERM}" Header="船样"  Width="Auto" MinWidth="40"/>                            
                            <DataGridTextColumn Binding="{Binding Path=VKPVERPART, Converter={StaticResource ResourceKey=gb2312}}" Header="包装要求"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPAUFMART, Converter={StaticResource ResourceKey=gb2312}}" Header=""  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPTSTLG, Converter={StaticResource ResourceKey=d1000}}" Header="标准匹长"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPSTLGV, Converter={StaticResource ResourceKey=d1000}}" Header="最小"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPSTLGB, Converter={StaticResource ResourceKey=d1000}}" Header="最大"  Width="Auto" MinWidth="40"/> 
                        </DataGrid.Columns>
                    </DataGrid>
                    <StackPanel Grid.Row="1" Grid.Column="3" Grid.ColumnSpan="2"> 
                     <DataGrid 
                        AutoGenerateColumns="False" EnableRowVirtualization="True"  
                            ItemsSource="{Binding Path=WASTAMM}"  
                            HeadersVisibility="Column"
                            x:Name="dgWASTAMM"  
                            CanUserReorderColumns="True"  
                            CanUserResizeRows="True"
                            CanUserSortColumns="True" 
                            RowDetailsVisibilityMode="VisibleWhenSelected"   
                            Width="Auto"
                            Height="Auto"
                            EnableColumnVirtualization="True"  
                            ScrollViewer.HorizontalScrollBarVisibility="Auto"
                            ScrollViewer.VerticalScrollBarVisibility="Auto" 
                              SelectionChanged="dgWASTAMM_SelectionChanged"
                            >
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=WAART }" Header="品种"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=WAVAR}" Header="变量"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=WABEZ, Converter={StaticResource ResourceKey=gb2312}}" Header="描述"   Width="Auto"  MinWidth="120"/>
                        </DataGrid.Columns>
                    </DataGrid>
                    <Button Height="30" Margin="10,0,0,0" Name="cmdReferesh" HorizontalAlignment="Right" Width="30" Click="cmdReferesh_Click">
                            <Button.Background>
                                <ImageBrush   ImageSource="/IntexReportClient;component/Images/Reload.png" />
                            </Button.Background>
                        </Button>
                    </StackPanel>
                </Grid>
            </WrapPanel>  
        </Expander> 
            <Expander Header="面料信息:" Name="expWS"> 
                <StackPanel>
                <WrapPanel >
                    <Grid >
                            <Grid.RowDefinitions>
                                <RowDefinition  Height="1*" />
                                <RowDefinition  Height="1*" />
                            </Grid.RowDefinitions>
                            <WrapPanel Grid.Row="0">
                                <TextBlock Grid.Column="0">百米用纱:</TextBlock>
                                <TextBlock  Grid.Row="1" Text="{Binding Path=TXT010,  Source={StaticResource ResourceKey=vwVKPBEST}, Converter={StaticResource ResourceKey=gb2312},  Mode=OneWay}" Width="Auto" MinWidth="180" />
                            </WrapPanel> 
                            <WrapPanel Grid.Row="1">
                                <Grid >
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition  Width="1*" />
                                        <ColumnDefinition  Width="1*" />
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="0">原料成份:</TextBlock>
                                    <TextBlock  Grid.Column="1" Text="{Binding Path=TXT030,  Source={StaticResource ResourceKey=vwVKPBEST}, Mode=OneWay, Converter={StaticResource ResourceKey=gb2312}}" Width="Auto" MinWidth="180" />
                                </Grid>
                            </WrapPanel>
                        </Grid> 
                    <Grid >
                            <Grid.RowDefinitions>
                                <RowDefinition  Height="1*" />
                                <RowDefinition  Height="1*" />
                            </Grid.RowDefinitions>
                            <WrapPanel Grid.Row="0">
                                <TextBlock Grid.Column="0">纱支:</TextBlock>
                                <TextBlock  Grid.Column="1" Text="{Binding Path=TXT020,  Source={StaticResource ResourceKey=vwVKPBEST }, Mode=OneWay, Converter={StaticResource ResourceKey=gb2312}}" Width="Auto" MinWidth="180" />
                            </WrapPanel>
                            <WrapPanel Grid.Row="1">
                                <Grid >
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition  Width="1*" />
                                        <ColumnDefinition  Width="1*" />
                                        <ColumnDefinition  Width="1*" />
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="0" Width="Auto">组织:</TextBlock>
                                    <TextBlock  Grid.Column="1" Text="{Binding Path=WAPROGRP,  Source={StaticResource ResourceKey=vwWASTAMM}, Mode=OneWay, Converter={StaticResource ResourceKey=gb2312}}" Width="Auto" MinWidth="50" />
                                    <TextBlock  Grid.Column="2" Text="{Binding Path=WAARTGRP,  Source={StaticResource ResourceKey=vwWASTAMM}, Mode=OneWay, Converter={StaticResource ResourceKey=gb2312}}" Width="Auto" MinWidth="50" />
                                </Grid>
                            </WrapPanel>
                        </Grid>
                        <Grid >
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition  Width="1*" />
                                <ColumnDefinition  Width="1*" />
                                <ColumnDefinition  Width="1*" />
                                <ColumnDefinition  Width="1*" />
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0" Width="Auto">价格:</TextBlock>
                            <TextBlock  Grid.Column="1" Text="{Binding Path=VKPPREIS,  Source={StaticResource ResourceKey=vwVKPOS}, Mode=OneWay, Converter={StaticResource ResourceKey=dprice}}" Width="Auto" MinWidth="50" />
                            <TextBlock  Grid.Column="2" Text="{Binding Path=VKPVB,  Source={StaticResource ResourceKey=vwVKPOS}, Mode=OneWay, Converter={StaticResource ResourceKey=gb2312}}" Width="Auto" MinWidth="20" />
                            <TextBlock  Grid.Column="3" Text="{Binding Path=VKPPREH,  Source={StaticResource ResourceKey=vwVKPOS}, Mode=OneWay, Converter={StaticResource ResourceKey=gb2312}}" Width="Auto" MinWidth="20" />
                        </Grid>
                        <Grid >
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition  Width="1*" />
                                <ColumnDefinition  Width="1*" />
                            </Grid.ColumnDefinitions>
                            <WrapPanel Grid.Column="0">
                                <TextBlock>密度(</TextBlock>
                                <TextBlock  Text="{Binding Path=WAFDDIM,  Source={StaticResource ResourceKey=vwWASTAMM}, Mode=OneWay}" Width="Auto" MinWidth="20" />
                                <TextBlock>)</TextBlock>
                            </WrapPanel>                            
                            <StackPanel Grid.Column="1">
                                <WrapPanel>
                                    <TextBlock  Text="{Binding Path=WARFDDIK,  Source={StaticResource ResourceKey=vwWASTAMM}, Mode=OneWay, Converter={StaticResource ResourceKey=d100}}" Width="Auto" MinWidth="40" />
                                    <TextBlock Text="{Binding Path=WARFDDIS,  Source={StaticResource ResourceKey=vwWASTAMM}, Mode=OneWay,  Converter={StaticResource ResourceKey=d100}}" Width="Auto" MinWidth="40" />
                                </WrapPanel>
                                <WrapPanel>
                                    <TextBlock Text="{Binding Path=WAFFDDIK,  Source={StaticResource ResourceKey=vwWASTAMM}, Mode=OneWay,  Converter={StaticResource ResourceKey=d100}}" Width="Auto" MinWidth="40" />
                                    <TextBlock Text="{Binding Path=WAFFDDIS,  Source={StaticResource ResourceKey=vwWASTAMM}, Mode=OneWay,  Converter={StaticResource ResourceKey=d100}}" Width="Auto" MinWidth="40" />
                                </WrapPanel>
                            </StackPanel>
                        </Grid>
                     <Grid >
                            <Grid.RowDefinitions>
                                <RowDefinition  Height="1*" />
                                <RowDefinition  Height="1*" />
                            </Grid.RowDefinitions>
                            <WrapPanel Grid.Row="0">
                                <TextBlock Width="Auto">成品门幅:</TextBlock>
                                <TextBlock Text="{Binding Path=WAFBRTU,  Source={StaticResource ResourceKey=vwWASTAMM }, Mode=OneWay, Converter={StaticResource ResourceKey=d10}}" Width="Auto" MinWidth="50" />
                            </WrapPanel>
                            <WrapPanel Grid.Row="1">
                                <TextBlock  Width="Auto">有效门幅:</TextBlock>
                                <TextBlock  Text="{Binding Path=WAFBRTL,  Source={StaticResource ResourceKey=vwWASTAMM }, Mode=OneWay, Converter={StaticResource ResourceKey=d10}}" Width="Auto" MinWidth="50" />
                            </WrapPanel>
                        </Grid>
                        <Grid >
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"></RowDefinition>
                                <RowDefinition Height="Auto"></RowDefinition>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition  Width="1*" />
                                <ColumnDefinition  Width="1*" />
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Row="0" Grid.Column="0" Width="Auto" >购纱:</TextBlock>
                            <TextBlock Grid.Row="0" Grid.Column="1" Grid.RowSpan="2"  Text="{Binding Path=TXT040,  Source={StaticResource ResourceKey=vwVKPBEST }, Mode=OneWay, Converter={StaticResource ResourceKey=gb2312}}" HorizontalAlignment="Stretch"/>
                        </Grid>
                    </WrapPanel>
                    <WrapPanel>
                        <Grid >
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/> 
                            </Grid.ColumnDefinitions>
                            <TextBlock Grid.Column="0">后整理:</TextBlock>
                            <TextBlock Grid.Column="1"  Text="{Binding Path=WAFBEZ, Source={StaticResource ResourceKey=vwWAFARBEN}, Mode=OneWay, Converter={StaticResource ResourceKey=gb2312}}"
                                      Width="Auto" MinWidth="200"/>
                        </Grid>
                    </WrapPanel>
                </StackPanel>
            </Expander>
            <Expander Header="工艺要求/质量要求:" Name="expTech">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"></RowDefinition> 
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition  Width="1*" /> 
                    </Grid.ColumnDefinitions>
                    <StackPanel> 
                        <TextBlock  Text="{Binding Path=TXT050,  Source={StaticResource ResourceKey=vwVKPBEST }, Mode=OneWay, Converter={StaticResource ResourceKey=gb2312}}"  HorizontalAlignment="Stretch"/>
                        <TextBlock  Text="{Binding Path=TXT060,  Source={StaticResource ResourceKey=vwVKPBEST }, Mode=OneWay, Converter={StaticResource ResourceKey=gb2312}}"  HorizontalAlignment="Stretch"/>
                        <TextBlock Text="{Binding Path=TXT070,  Source={StaticResource ResourceKey=vwVKPBEST }, Mode=OneWay, Converter={StaticResource ResourceKey=gb2312}}"  HorizontalAlignment="Stretch"/>
                        <TextBlock   Text="{Binding Path=TXT080,  Source={StaticResource ResourceKey=vwVKPBEST }, Mode=OneWay, Converter={StaticResource ResourceKey=gb2312}}" HorizontalAlignment="Stretch"/>
                        <TextBlock  Text="{Binding Path=TXT090,  Source={StaticResource ResourceKey=vwVKPBEST }, Mode=OneWay, Converter={StaticResource ResourceKey=gb2312}}"  HorizontalAlignment="Stretch"/>
                        <TextBlock Text="{Binding Path=TXT100,  Source={StaticResource ResourceKey=vwVKPBEST }, Mode=OneWay, Converter={StaticResource ResourceKey=gb2312}}"  HorizontalAlignment="Stretch"/>
                        <TextBlock  Text="{Binding Path=TXT110,  Source={StaticResource ResourceKey=vwVKPBEST }, Mode=OneWay, Converter={StaticResource ResourceKey=gb2312}}"  HorizontalAlignment="Stretch"/>
                        <TextBlock  Text="{Binding Path=TXT120,  Source={StaticResource ResourceKey=vwVKPBEST }, Mode=OneWay, Converter={StaticResource ResourceKey=gb2312}}" HorizontalAlignment="Stretch"/>
                        <TextBlock  Text="{Binding Path=TXT130,  Source={StaticResource ResourceKey=vwVKPBEST }, Mode=OneWay, Converter={StaticResource ResourceKey=gb2312}}" HorizontalAlignment="Stretch"/>
                        <TextBlock  Text="{Binding Path=TXT140,  Source={StaticResource ResourceKey=vwVKPBEST }, Mode=OneWay, Converter={StaticResource ResourceKey=gb2312}}" HorizontalAlignment="Stretch"/>
                        <TextBlock  Text="{Binding Path=TXT150,  Source={StaticResource ResourceKey=vwVKPBEST }, Mode=OneWay, Converter={StaticResource ResourceKey=gb2312}}" HorizontalAlignment="Stretch"/>
                        <TextBlock  Text="{Binding Path=TXT160,  Source={StaticResource ResourceKey=vwVKPBEST }, Mode=OneWay, Converter={StaticResource ResourceKey=gb2312}}"  HorizontalAlignment="Stretch"/>
                        <TextBlock  Text="{Binding Path=TXT170,  Source={StaticResource ResourceKey=vwVKPBEST }, Mode=OneWay, Converter={StaticResource ResourceKey=gb2312}}"  HorizontalAlignment="Stretch"/>
                        <TextBlock  Text="{Binding Path=TXT180,  Source={StaticResource ResourceKey=vwVKPBEST }, Mode=OneWay, Converter={StaticResource ResourceKey=gb2312}}" HorizontalAlignment="Stretch"/>
                        <TextBlock  Text="{Binding Path=TXT190,  Source={StaticResource ResourceKey=vwVKPBEST }, Mode=OneWay, Converter={StaticResource ResourceKey=gb2312}}" HorizontalAlignment="Stretch"/>
                        <TextBlock  Text="{Binding Path=TXT200,  Source={StaticResource ResourceKey=vwVKPBEST }, Mode=OneWay, Converter={StaticResource ResourceKey=gb2312}}" HorizontalAlignment="Stretch"/>
                    </StackPanel>
                </Grid>
            </Expander>
            <Expander Header="测试要求:" Visibility="Hidden">
                <DataGrid AutoGenerateColumns="False"
                          EnableRowVirtualization="False" 
                          EnableColumnVirtualization="False"
                          ItemsSource="{Binding Source={StaticResource ResourceKey=vwWAPROF}}" 
                          x:Name="dlgWAPROF"  
                          FontSize="14"
                          MinHeight="200"
                          RowHeight="60"
                          Margin="0,0,0,2" Grid.RowSpan="2">
                    <DataGrid.LayoutTransform>
                        <TransformGroup>
                            <RotateTransform Angle="90"/>
                            <MatrixTransform Matrix="-1,0,0,1,0,0"/>
                        </TransformGroup>
                    </DataGrid.LayoutTransform>
                    <DataGrid.ColumnHeaderStyle>
                        <Style TargetType="{x:Type DataGridColumnHeader}" 
                BasedOn="{StaticResource {x:Type DataGridColumnHeader}}">
                            <Setter Property="LayoutTransform">
                                <Setter.Value>
                                    <TransformGroup>
                                        <RotateTransform Angle="90"/>
                                        <ScaleTransform ScaleX="-1" ScaleY="1" />
                                    </TransformGroup>
                                </Setter.Value>
                            </Setter>
                        </Style>
                    </DataGrid.ColumnHeaderStyle>
                    <DataGrid.CellStyle>
                        <Style  TargetType="DataGridCell">
                            <Setter Property="LayoutTransform">
                                <Setter.Value>
                                    <TransformGroup>
                                        <RotateTransform Angle="90"/>
                                        <ScaleTransform ScaleX="-1" ScaleY="1" />
                                    </TransformGroup>
                                </Setter.Value>
                            </Setter>
                        </Style>
                    </DataGrid.CellStyle>
                    <DataGrid.Columns>
                        <DataGridTextColumn  Binding="{Binding Path=WAPANFART, Mode=OneWay, Converter={StaticResource ResourceKey=gb2312}}"  Header="项目" Width="Auto" />
                        <DataGridTextColumn  Binding="{Binding Path=QPMBEZ, Mode=OneWay, Converter={StaticResource ResourceKey=gb2312}}"  Header="描述" Width="Auto" MaxWidth="40" />
                        <DataGridTextColumn  Binding="{Binding Path=WAPME}" Header="单位" Width="Auto" />
                        <DataGridTextColumn  Binding="{Binding Path=WAPMIN}" Header="下限" Width="Auto" />
                        <DataGridTextColumn  Binding="{Binding Path=WAPMAX}" Header="上限" Width="Auto" /> 
                    </DataGrid.Columns>
                </DataGrid>
            </Expander>  
            <Expander Header="备注:"> 
              <StackPanel>
                        <TextBox   Text="{Binding Path=TXT010, Source={StaticResource ResourceKey=vwVKKBEST}, Converter={StaticResource ResourceKey=gb2312}}" HorizontalAlignment="Stretch"/>
                        <TextBox    Text="{Binding Path=TXT020, Source={StaticResource ResourceKey=vwVKKBEST}, Converter={StaticResource ResourceKey=gb2312}}" HorizontalAlignment="Stretch"/>
                        <TextBox   Text="{Binding Path=TXT030, Source={StaticResource ResourceKey=vwVKKBEST}, Converter={StaticResource ResourceKey=gb2312}}" HorizontalAlignment="Stretch"/>
                        <TextBox  Text="{Binding Path=TXT040, Source={StaticResource ResourceKey=vwVKKBEST}, Converter={StaticResource ResourceKey=gb2312}}" HorizontalAlignment="Stretch"/>
                        <TextBox   Text="{Binding Path=TXT050, Source={StaticResource ResourceKey=vwVKKBEST}, Converter={StaticResource ResourceKey=gb2312}}" HorizontalAlignment="Stretch"/>
                        <TextBox  Text="{Binding Path=TXT060, Source={StaticResource ResourceKey=vwVKKBEST}, Converter={StaticResource ResourceKey=gb2312}}" HorizontalAlignment="Stretch"/>
                        <TextBox  Text="{Binding Path=TXT070, Source={StaticResource ResourceKey=vwVKKBEST}, Converter={StaticResource ResourceKey=gb2312}}" HorizontalAlignment="Stretch"/>
                    </StackPanel>             
            </Expander> 
    </StackPanel>
</local:DocumentBase>